<script setup lang="ts">
import { getanalyze } from '@/api/user'
const state = reactive({
  formObj:{
    total:0,
    drugs:0,
    verify:0
  }
})
getanalyze().then((res) => {
  state.formObj = res
})

</script>

<template>
  <div class="dashboard-container">
    <el-card shadow="never">
      <div class="card">
        <p class="title">{{ $t("home.Totalnumberofprescriptions") }}：</p>
        <p>{{state.formObj.total}}{{ $t("home.times") }}</p>
      </div>
      <div class="card1">
        <p class="title">{{ $t("home.Totanumberofprescriptionentries") }}：</p>
        <p>{{state.formObj.drugs}}{{ $t("home.pieces") }}</p>
      </div>
      <div class="card2">
        <p class="title">{{ $t("home.Numberofprescriptionstobereviewed") }}：</p>
        <p>{{state.formObj.verify}}{{ $t("home.pieces") }}</p>
      </div>
    </el-card>

  </div>
</template>

<style lang="scss" scoped>
.dashboard-container {
  :deep(.el-card__body) {
    display: flex !important;
    justify-content: space-between;
  }

  .card {
    width: 504px;
    height: 194px;
    background-image: url(../../assets/images/1.png);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    padding-left: 87px;
    font-size: 32px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    color: #FFFFFF;
    text-shadow: 0px 1px 9px rgba(38, 38, 38, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;

    .title {
      font-size: 18px;
    }
  }

  .card1 {
    width: 504px;
    height: 194px;
    background-image: url(../../assets/images/2.png);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    margin-left: 10px;
    padding-left: 87px;
    font-size: 32px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    color: #FFFFFF;
    text-shadow: 0px 1px 9px rgba(38, 38, 38, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;

    .title {
      font-size: 18px;
    }
  }

  .card2 {
    width: 504px;
    height: 194px;
    margin-left: 10px;
    background-image: url(../../assets/images/3.png);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    padding-left: 87px;
    font-size: 32px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    color: #FFFFFF;
    text-shadow: 0px 1px 9px rgba(38, 38, 38, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;

    .title {
      font-size: 18px;
    }
  }
}
</style>
